Skip to content

fix(#489): inject issue reference into PR titles - #492

Merged
rh-hemartin merged 1 commit into
mainfrom
agent/489-pr-title-convention
Apr 29, 2026
Merged

fix(#489): inject issue reference into PR titles#492
rh-hemartin merged 1 commit into
mainfrom
agent/489-pr-title-convention

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

The code agent generates PR titles from the commit subject line using plain conventional commit format (e.g. "fix: description"), but many target repos enforce title conventions like "type(TICKET): description" via CI checks.

Two changes fix this:

  1. post-code.sh now detects conventional commit subjects without
    a scope and injects the issue number as "(#NNN)" before the
    description. Titles that already have a scope (e.g. Jira IDs
    or component names) are left unchanged.

  2. The code-implementation skill (SKILL.md) now instructs the
    agent to include the issue reference in the commit subject
    and to discover PR title conventions during step 3.

The post-code.sh fallback is the reliable backstop since the post-script always knows the issue number. The skill update teaches the agent to produce correct titles directly, which also handles Jira-style ticket IDs from the issue body.

Added post-code-test.sh with 13 test cases covering scope injection, pre-existing scopes, and non-conventional titles.

Note: pre-commit could not run (network error in sandbox). post-triage-test.sh and go tests could not run (jq and go not available in sandbox). Manual verification required.

Closes #489

Changed files

  • Makefile
  • internal/scaffold/fullsend-repo/scripts/post-code-test.sh
  • internal/scaffold/fullsend-repo/scripts/post-code.sh
  • internal/scaffold/fullsend-repo/skills/code-implementation/SKILL.md

Closes #489

Post-script verification

  • Branch is not main/master (agent/489-pr-title-convention)
  • Secret scan passed (gitleaks — d2afe5d208fdd4c850432c8cd3085baaea349b73..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Created by fullsend code agent

The code agent generates PR titles from the commit subject line
using plain conventional commit format (e.g. "fix: description"),
but many target repos enforce title conventions like
"type(TICKET): description" via CI checks.

Two changes fix this:

1. post-code.sh now detects conventional commit subjects without
   a scope and injects the issue number as "(#NNN)" before the
   description. Titles that already have a scope (e.g. Jira IDs
   or component names) are left unchanged.

2. The code-implementation skill (SKILL.md) now instructs the
   agent to include the issue reference in the commit subject
   and to discover PR title conventions during step 3.

The post-code.sh fallback is the reliable backstop since the
post-script always knows the issue number. The skill update
teaches the agent to produce correct titles directly, which
also handles Jira-style ticket IDs from the issue body.

Added post-code-test.sh with 13 test cases covering scope
injection, pre-existing scopes, and non-conventional titles.

Note: pre-commit could not run (network error in sandbox).
post-triage-test.sh and go tests could not run (jq and go
not available in sandbox). Manual verification required.

Closes #489
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Apr 28, 2026
@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://ce72a853-site.fullsend-ai.workers.dev

Commit: a37e87d567e70497852cd3acf1c117a71d916d58

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: #492

Head SHA: a37e87d
Timestamp: 2026-04-28T17:00:00Z
Outcome: approve

Summary

This PR correctly addresses #489 by adding a post-script backstop that injects issue references into conventional commit PR titles, plus skill instructions teaching the agent to produce correct titles directly. The layered approach (skill guidance + post-script fallback) is sound. The shell logic is correct, well-tested with 13 cases, and handles edge cases gracefully. No security concerns.

Findings

Low

  • [correctness] internal/scaffold/fullsend-repo/scripts/post-code-test.sh:18 — The test reimplements the title-rewriting logic rather than sourcing it from post-code.sh, which means the two copies can drift out of sync. The comment at line 15-16 acknowledges this trade-off (the production script requires git/GitHub context that makes sourcing impractical). Acceptable, but worth noting for future maintainers.

Info

  • [correctness] internal/scaffold/fullsend-repo/scripts/post-code.sh:204 — Conventional commit breaking change syntax (fix!: description) won't match either grep pattern, so it falls to the else branch and is left as-is (no scope injection). This is a rare case for agent-generated commits and the behavior is safe (title is preserved unchanged), but could be added to the test suite for documentation.

Footer

Outcome: approve
This review applies to SHA a37e87d567e70497852cd3acf1c117a71d916d58. Any push to the PR head clears this review and requires a new evaluation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code agent ignores target repo's PR title convention — PRs fail CI title checks

1 participant